﻿using System;
using log4net;

namespace Infrastructure.Logging
{
    public class LoggingService : ILoggingService
    {
        private static ILog _log;

        public ILog Log
        {
            get { return _log ?? (_log = LogManager.GetLogger(typeof (LoggingService))); }
        }

        public void ReportError(string message, Exception exception)
        {
            Log.Error(message, exception);
        }

        public void ReportWarning(string message)
        {
            Log.Warn(message);
        }

        public void ReportInfo(string message)
        {
            Log.Info(message);
        }
    }
}
